package com.eestimate.domain.impl;

import com.eestimate.dao.database.DBObject;
import com.eestimate.domain.Company;
import com.eestimate.domain.business.BusinessObjectImpl;
import com.eestimate.domain.business.common.BusinessObjectTypeEnum;
import com.eestimate.domain.business.common.annotations.PersistentBusinessObject;
import com.eestimate.domain.business.common.annotations.PersistentMetadata;
import com.eestimate.valuesobjects.BaseDTO;
import com.eestimate.valuesobjects.CompanyVo;

@PersistentBusinessObject(type=BusinessObjectTypeEnum.COMPANY)
public class CompanyImpl extends BusinessObjectImpl implements Company{

	public CompanyImpl(DBObject dbObject) {
		super(dbObject);
		// TODO Auto-generated constructor stub
	}
	
	@PersistentMetadata
	public String overview;
	
	@PersistentMetadata
	public String companyType;
	
	@PersistentMetadata
	public String webLink;
	
	@PersistentMetadata
	public String licenseNumber;

	@PersistentMetadata
	public String licenseLink;

	@PersistentMetadata
	public String address;
	
	@PersistentMetadata
	public String country;
	
	@Override
	public String getOverview() {
		return overview;
	}

	@Override
	public void setOverview(String overview) {
		this.overview = overview;
	}

	@Override
	public String getCompanyType() {
		return companyType;
	}

	@Override
	public void setCompanyType(String companyType) {
		this.companyType = companyType;
	}

	@Override
	public String getWebLink() {
		return webLink;
	}

	@Override
	public void setWebLink(String webLink) {
		this.webLink = webLink;
	}

	@Override
	public String getLicenseNumber() {
		return licenseNumber;
	}

	@Override
	public void setLicenseNumber(String licenseNumber) {
		this.licenseNumber = licenseNumber;
	}

	@Override
	public String getLicenseLink() {
		return licenseLink;
	}

	@Override
	public void setLicenseLink(String licenseLink) {
		this.licenseLink = licenseLink;
	}

	@Override
	public String getAddress() {
		return address;
	}

	@Override
	public void setAddress(String address) {
		this.address = address;
	}

	@Override
	public String getCountry() {
		return country;
	}

	@Override
	public void setCountry(String country) {
		this.country = country;
	}
	
	@Override
	public BaseDTO createDTO(){
		CompanyVo vo = new CompanyVo();
		vo.uuid = this.getUuid();
		vo.type	= this.getType();
		vo.name = this.getName();
		
		vo.overview 		= this.getOverview();
		vo.companyType 		= this.getCompanyType();
		vo.webLink			= this.getWebLink();
		vo.licenseNumber 	= this.getLicenseNumber();
		vo.licenseLink  	= this.getLicenseLink();
		vo.address			= this.getAddress();
		vo.country			= this.getCountry();
		
		return vo;
	}
	
	

}
